alter table jms_dm.dm_tab_in_center_package_site_summary_dt
    set tblproperties ('external.table.purge' = 'true');
drop table jms_dm.dm_tab_in_center_package_site_summary_dt;
CREATE EXTERNAL TABLE if not exists jms_dm.dm_tab_in_center_package_site_summary_dt
(
    date_time               string comment '日期',
    scan_site_code          string comment '扫描网点编号',
    input_site              string comment '扫描网点名称',
    site_agent_code         string comment '所属代理区code',
    site_agent_name         string comment '所属代理区名称',
    network_type            int comment '扫描网点类型2.转运中心,3.集散点',
    way_net_total           int comment '进港总发件量',
    need_way_num            int comment '应建包票数',
    in_pack_way_num         int comment '进港建包票数',
    need_no_way_num         int comment '应建未建票数',
    pack_num                int comment '进港建包数',
    first_pack_way_num      int comment '一段码包票数',
    first_pack_num          int comment '一段码包数',
    loop_in_pack_way_num    int comment '循环袋包内件票数',
    loop_pack_num           int comment '进港建包数',
    error_pack_way_num      int comment '错建包票数',
    need_pack_direc_way_num int comment '文件类应建包票数',
    have_pack_direc_way_num int comment '文件类已建包票数',
    hav_pack_way_num        int comment '总建包票数'
)
    COMMENT '进港建包统计报表明细'
    PARTITIONED BY ( dt STRING COMMENT '建包时间')
    STORED AS PARQUET
    LOCATION '/dw/hive/jms_dm.db/external/dm_tab_in_center_package_site_summary_dt'
;